import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:razer_one/app/main/constants/color_constants.dart';
import 'package:razer_one/app/main/view/main_btn.dart';
import 'package:razer_one/app/main/view/main_text.dart';
import 'package:razer_one/app/main/view/main_textfield.dart';
import 'package:razer_one/app/modules/me/password/password_controller.dart';

class PasswordPage extends GetView<PasswordController> {
  const PasswordPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GetBuilder<PasswordController>(builder: (_) {
      return Scaffold(
        backgroundColor: Colors.white,
        appBar: AppBar(
          title: const Text("修改密码"),
        ),
        body: ListView(
          padding: const EdgeInsets.all(20),
          children: [
            const MainText(
              "原密码",
              textColor: Color(kBlueColor),
            ),
            sizeH(5),
            MainTextField(
              "请输入原密码",
              _.userNameTf,
              width: double.infinity,
            ),
            sizeH(_.margin),
            const MainText(
              "新密码",
              textColor: Color(kBlueColor),
            ),
            sizeH(5),
            MainTextField(
              "请输入新密码",
              _.passwordTf1,
              width: double.infinity,
            ),
            sizeH(10),
            MainTextField(
              "请再次输入新密码",
              _.passwordTf2,
              width: double.infinity,
            ),
            sizeH(_.margin),
            MainCommitBtn(
              "提交",
              handle: _.commitBtnClick,
              btnW: double.infinity,
            )
          ],
        ),
      );
    });
  }
}
